extends Node2D

func _ready() -> void:
	# 创建连接
	#await WebSocketManager.connect_server(self)
	# 发送消息事件
	#WebSocketManager.send_message(self,EventManager.newCreateRoomEvent())
	#WebSocketManager.send_message(self,EventManager.newJoinRoomEvent("lijinfeng"))
	#WebSocketManager.send_message(self,EventManager.newGroupChatEvent("lijinfeng","你好吗？"))
	#WebSocketManager.send_message(self,EventManager.newRoomHeartBeatEvent("lijinfeng"))
	#WebSocketManager.send_message(self,EventManager.newCloseRoomEvent("lijinfeng"))
	pass

func _process(delta: float) -> void:
	# 接收消息响应
	var message = "none"# WebSocketManager.recive_message(self)	
	if (message != "none"):
		print("Got data from server: ", message)
